package cn.edu.zafu.bigdata.x.sxy;

public interface Movable {
    void move();
    void stop();
}

interface Resizable{
    void resize(double factor);
}

class Car2 implements Movable{
    @Override
    public void move(){
        System.out.println("The car is moving.");
    }
    @Override
    public void stop(){
        System.out.println("The car has stopped.");
    }
}

class ResizableCircle implements Movable, Resizable{
    private double radius;

    public ResizableCircle(double radius) {
        this.radius = radius;
    }

    @Override
    public void move(){
        System.out.println("The circle is moving.");
    }
    @Override
    public void stop(){
        System.out.println("The circle has stopped.");
    }
    @Override
    public void resize(double factor){
        radius *= factor;
        System.out.println("The new radius of the circle is: " + radius);
    }
    public double getRadius(){
        return radius;
    }
}
